package com.lottery.game.core.modules.mapper;

import com.lottery.game.core.modules.entity.user.GameBets;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 游戏下注DAO接口
 * @author zhuiyv
 * @version 2018-06-17
 */
public interface GameBetsDao{
	 List<GameBets> queryGameBets(GameBets gameBets);

	 List<GameBets> batchQueryGameBets(@Param("gameBets") GameBets gameBets,@Param("gameBetIdList") List<String> gameBetIdList);

	 List<GameBets> queryGameBetsForRoom(@Param("userId") String userId,
          @Param("roomId") String roomId, @Param("gameId") String gameId,
          @Param("start") int start, @Param("size") int size,
          @Param("startDate") String startDate, @Param("endDate") String endDate);

	 /**
	  * @Description 根据博彩类型去查选房间
	  * @param:
	  * @Return
	  * @Date 2019/4/23_15:22
	  */
	List<GameBets> queryGameBetsForRoomByTickType(@Param("userId") String userId,
										@Param("startDate") String startDate, @Param("endDate") String endDate,
										@Param("gameTypePlayingTicket") String gameTypePlayingTicket,
										@Param("status") String status,
										@Param("betType") String betType);

	/**
	 * @Description 根据博彩类型去查选房间
	 * @param:
	 * @Return
	 * @Date 2019/4/23_15:22
	 */
	List<GameBets> queryGameBetsForRoomByTickTypeLast(@Param("userId") String userId,
												  @Param("startDate") String startDate, @Param("endDate") String endDate,
												  @Param("gameTypePlayingTicket") String gameTypePlayingTicket,
												  @Param("status") String status);

	 void addGameBets(GameBets gameBets);

	 void addGameBetsByMap(Map<String, Object> map);

	 void updateGameBets(GameBets gameBets);

	 Integer deleteGameBets(GameBets gameBets);

	 Integer batchDeleteGameBets(@Param("gameBets") GameBets gameBets,@Param("gameBetIdList"
	 ) List<String> gameBetIdList);

	 Map<String, Object> queryUserBetSum(@Param("userId") String userId, @Param("roomNumber"
    ) String roomNumber,
            @Param("startDate") String startDate, @Param("endDate") String endDate);

	 void addBatchGameBetsByMap(List<Map<String, Object>> betList);
}
